Thieves are generally less likely to break into a home which appears to be vacant or unoccupied. However, even if a house has an alarm system, thieves can be in and out of a house before anyone, e.g. police or neighbors, can respond. Thieves are less likely to do home invasions where someone is present in the household. They prefer the home to be vacant. So it is advantageous to prevent a break-in in the first place rather than to simply sound an alarm after it is too late to effectively respond.